package structural.decorator.custom.condiment;

import structural.decorator.custom.Coffee;
import structural.decorator.custom.Condiment;

/**
 * 装饰：调料-牛奶
 */
public class Milk implements Condiment {
    Coffee coffee;

    public Milk(Coffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public String getDescription() {
        return coffee.getDescription() + ", 牛奶";
    }

    @Override
    public double cost() {
        return coffee.cost() + .5;
    }
}
